<template>
   <div class="loba">
    <div class="lu">
      <img src="http://localhost:20338/StaticFiles/鹿.jpg">
    </div>
    <div class="zong">
      <h3><span>账号登录 | </span><span>扫码登录</span></h3>
      <div class="div">
        <input v-model="loginData.uname" placeholder="请输入账号" />
      </div>
      <div class="div">
        <input v-model="loginData.password" placeholder="请输入密码" />
      </div>
      <div class="div">
        <button type="warning" class="btn" @click="logins">注册</button>
      </div>
      <div class="div">
        <div class="zuo">
          <a>手机短信登录/注册</a>
        </div>
        <div class="you"><a @click="ce">立即登录</a><a> | 忘记密码？</a></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      loginData: {
        uname: "",
        password: "",
      },
    };
  },
  methods: {
    logins() {
      this.$axios
        .post("http://localhost:20338/api/XiaoMi/Register", this.loginData)
        .then((res) => {
          if (res.data > 0) {
            this.$message.success("注册成功");
          } else {
            this.$message.error("注册失败");
          }
        });
    },
    ce(){
        this.$router.push("/login");
    }
  },
  created() {},
};
</script>

<style scoped>
.lu{
  width: 1900px;
  height: 1000px;
}
.loba{
  width: 1900px;
  height: 1000px;
}
.zong {
  width: 400px;
  height: 500px;
  background-color: rgb(172, 30, 30);
  margin-left: 1200px;
  margin-top: -900px;
}
.btn {
  width: 80%;
  background-color: orange;
  height: 40px;
  border-style: none;
}
.div {
  margin-top: 30px;
}
input {
  width: 80%;
  height: 40px;
  border-color: gray;
  border: 1px solid;
}
.zuo {
  width: 100px;
  margin-left: 30px;
  font-size: 2px;
}
.you {
  width: 130px;
  margin-left: 240px;
  font-size: 2px;
  margin-top: -16px;
}
</style>